﻿// An implementation of a view with a single child element
define([
    'Wjs/ui/elements/View',
    'Wjs/ui/elements/mixins/SingleContainer'
],
function () {
    'use strict';

    return Wjs.defineOnce({

        type: 'ViewSingleContainer',

        internal: {

            base: Wjs.getType('View'),

            mixins: [
                 Wjs.getType('SingleContainer')
            ]
        },

        clone: function () {
            var cloned = Wjs.getType('View').prototype.clone.call(this),
                item = this.getItem();

            if (item) {

                cloned.setItem(item.clone());
            }
            
            return cloned;
        }
    });
});